import React, { Component } from 'react';
import Header from './common/header/header'
import {GlobalStyle} from './style'
import {GlobalFont} from './static/iconfont/iconfont'
import {BrowserRouter,Route} from 'react-router-dom'
import Home from './pages/home/index'
import Detail from './pages/detail/index'
import Login from './pages/login/index'
class App extends Component {
  render() {
    return (
      <div className="App">
      {/* 使用全局样式 */}
        <GlobalStyle></GlobalStyle>
        <GlobalFont></GlobalFont>
        
        <div>
          <BrowserRouter>
            <div>
              <Header></Header>
              <Route path='/' exact component={Home}></Route>
              <Route path='/detail' exact component={Detail}></Route>
              <Route path='/login' exact component = {Login}></Route>
            </div>
          </BrowserRouter>
        </div>
      </div>
    );
  }
}

export default App;
